Cover TOC Chap Prev Chap Prev Fig Next Fig Next Chap

Chapter 15: Building Extruded Shapes

../ch15/15fig12.gif
Figure 15.12

A torus built using a circular cross section swept along a circular spine.

15fig12.wrl
Click on the image to view the VRML scene.

#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Shape {
    appearance Appearance {
        material Material {
            diffuseColor 1.0 0.0 1.0
        }
    }
    geometry Extrusion {
        creaseAngle 1.57
        beginCap FALSE
        endCap   FALSE
        crossSection [
        # Circle
             1.00  0.00,   0.92 -0.38,
             0.71 -0.71,   0.38 -0.92,
             0.00 -1.00,  -0.38 -0.92,
            -0.71 -0.71,  -0.92 -0.38,
            -1.00 -0.00,  -0.92  0.38,
            -0.71  0.71,  -0.38  0.92,
             0.00  1.00,   0.38  0.92,
             0.71  0.71,   0.92  0.38,
             1.00  0.00
        ]
        spine [
        # Circle
             2.00 0.0  0.00,   1.85 0.0 0.77,
             1.41 0.0  1.41,   0.77 0.0 1.85,
             0.00 0.0  2.00,  -0.77 0.0 1.85,
            -1.41 0.0  1.41,  -1.85 0.0 0.77,
            -2.00 0.0  0.00,  -1.85 0.0 -0.77,
            -1.41 0.0 -1.41,  -0.77 0.0 -1.85,
             0.00 0.0 -2.00,   0.77 0.0 -1.85,
             1.41 0.0 -1.41,   1.85 0.0 -0.77,
             2.00 0.0  0.00,
        ]
    }
}